package com.tcl.aota.manage;

import java.util.List;
import java.util.Map;

import com.tcl.aota.persistent.model.AppLog;

public interface AppLogManage {
    public Map<String, Object> getAll();

    //public List<Object> statistics(int type, int day, float percent);

    /**
     * add a app log data
     *
     * @param appLogs
     * @return
     */
    public int batchInsert(List<AppLog> appLogs) throws Exception;

    /**
     * 通过时间、AppName按app维度统计查询各个app的浏览量,下载量,安装量，更新量
     *
     * @param conditions
     * @return
     */
    public List<Map<String, Object>> selectAppGroupByAppIdBetweenDate(Map<String, Object> conditions);

    /**
     * 通过时间、AppName按app纬度统计查询各个app的浏览量,下载量,安装量，更新量总数量
     *
     * @param conditions
     * @return
     */
    public int countAppGroupByAppIdBetweenDate(Map<String, Object> conditions);

    /**
     * 通过时间按时间纬度统计查询app的浏览量,下载量,安装量，更新量
     *
     * @param conditions
     * @return
     */
    public List<Map<String, Object>> selectAppGroupByDateBetweenDate(Map<String, Object> conditions);

    /**
     * 通过时间按时间纬度统计查询app的浏览量,下载量,安装量，更新量的总数量
     *
     * @param conditions
     * @return
     */
    public int countAppGroupByDateBetweenDate(Map<String, Object> conditions);

    /**
     * 通过时间按浏览量，下载量，安装量，更新量的IMEI去重统计
     *
     * @param condition
     * @return
     */
    public List<Map<String, Object>> selectAppImeiNumGroupByDate(Map<String, Object> condition);


    /**
     * 通过时间按浏览量，下载量，安装量，更新量的IMEI去重总数。
     *
     * @param conition
     * @return
     */
    public int countAppImeiNumGroupByDate(Map<String, Object> conition);
}
